Arithmetic device for calculating between physical quantities including units, and database used thereby

ABSTRACT

An arithmetic device includes a database that stores a first indicator representing a base unit included in a unit system being assigned with a prime number other than a prime factor of a prefix, and a second indicator derived by combining the base units, in a form of a simple fraction; a conversion section that obtains a plurality of physical quantities each including a quantity, a prefix, and possibly a unit, to derive a third indicator by converting the unit into the first indicator and multiplying the converted first indicator by the prefix, or when the unit belongs to the derived unit, by converting the unit into the second indicator and multiplying the converted second indicator by the prefix; and an arithmetic section that performs calculation between the quantities of the plurality of physical quantities and between the third indicators.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority fromthe prior Japanese Patent Application No. 2011-209988, filed on Sep. 26,2011, the entire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein generally relate to an arithmetic deviceand a database.

BACKGROUND

Generally, for a calculation between different physical quantitiesincluding units, the calculation is performed based on stringprocessing.

However, for a calculation between different physical quantitiesincluding units and prefixes, if the calculation is performed based onthe string processing, the handling may be very complicated because thedifferences in order of arithmetic expressions and in notation (font andthe like) of units and prefixes should be taken into consideration forthe string processing.

Moreover, it is difficult to accurately collate the units resulting fromthe calculation and thus it is difficult to obtain the calculationresult without an error.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating a configuration of an arithmetic deviceaccording to a first embodiment.

FIG. 2 is a flowchart illustrating a process by an assignment section ofthe arithmetic device according to the first embodiment (assignment to abase unit).

FIG. 3 is a flowchart illustrating another process by the assignmentsection of the arithmetic device according to the first embodiment(assignment to a derived unit).

FIG. 4 is a flowchart illustrating a process by an arithmetic section ofthe arithmetic device according to the first embodiment.

FIG. 5 is a diagram illustrating a configuration of an arithmetic deviceaccording to a second embodiment.

DETAILED DESCRIPTION

In view of the above circumstances, an aspect of embodiments provides anarithmetic device including: a database that stores a first indicatorrepresenting a base unit included in a unit system being assigned with aprime number other than a prime factor of a prefix which is expressedwith a base, including the prime factor, and an exponential part, and asecond indicator representing a derived unit expressed by combining thebase units in a form of a simple fraction including a numerator and adenominator each of which is assigned with an integer which is theproduct of the first indicators; a conversion section that obtains aplurality of physical quantities each including a quantity, a prefix,and a unit, when the unit belongs to the base unit, the conversionsection obtaining a third indicator by converting the unit into thefirst indicator and multiplying the converted first indicator by theprefix, or when the unit belongs to the derived unit, the conversionsection obtaining the third indicator by converting the unit into thesecond indicator and multiplying the converted second indicator by theprefix; and an arithmetic section that performs a calculation betweenthe quantities of the plurality of physical quantities and between thethird indicators.

In view of the above circumstances, another aspect of the embodimentsprovides a database that stores a first indicator representing a baseunit included in a unit system being assigned with a prime number otherthan a prime factor of a prefix which is expressed with a base,including the prime factor, and an exponential part, and a secondindicator representing a derived unit expressed by combining the baseunits in a form of a simple fraction including a numerator and adenominator each of which is assigned with an integer which is theproduct of the first indicators.

According to the aspects of embodiments, a calculation can be performedbetween different physical quantities including a unit and a prefixwithout an error.

Herein below, embodiments for carrying out the invention will bedescribed.

First Embodiment

FIG. 1 is a diagram illustrating a configuration of an arithmetic device1000 according to a first embodiment.

The arithmetic device 1000 according to this embodiment performs acalculation between different physical quantities each including aprefix and a unit.

The arithmetic device 1000 illustrated in FIG. 1 includes an assignmentsection 10, a conversion section 20, an arithmetic section 30, adatabase 50, a storage section 60, an input device 70 such as akeyboard, and an output device 80 such as a display. Further, theassignment section 10, the conversion section 20, and the arithmeticsection 30 are implemented by an arithmetic processing device 100 suchas a CPU or the like. In addition, the database 50 and the storagesection 60 are implemented by a storage device 200 such as a memory.

Herein below, the functions of the assignment section 10 will bedescribed in detail.

The assignment section 10 assigns a unique prime number (hereinafter,referred to as a first indicator), as an identifier (ID) to be uniquelydetermined, to each of the SI base units for physical quantities, andstores the identifiers into the database 50.

In addition, the assignment section 10 assigns a set of unique integers(hereinafter, referred to as a second indicator) to a derived unit whichis obtained by combining the SI base units and can be expressed in theform of a simple fraction when combined, and stores the set as aninteger value into the database 50.

(Base Unit)

FIG. 2 is a flowchart illustrating a process of assigning the firstindicator to a base unit.

The assignment section 10 counts up integers in ascending order (S101),and determines whether or not the counted integer is a prime numberbased on a known method, for example, the Erastothenes' sieve, theAdleman-Pomerance-Rumely (APR) primality test, or the like (S102).

Here, the prime numbers under 100 include 2, 3, 5, 7, 11, 13, 17, 19,23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, and 97.

In a case where the counted integer is a prime number, the assignmentsection 10 refers to a first list which includes base units to beassigned with first indicators stored in the storage section 60. Then,the assignment section 10 extracts base units one by one in order of thefirst list (S103). The assignment section 10 assigns one of the firstindicators to the extracted base unit (S104). In a case where thecounted integer is not a prime number, the assignment section 10 resumescounting up integers until a prime number appears.

The assignment section 10 assigns a unique first indicator to each ofthe base units (including dimensionless quantities) which have beenlisted in the first list stored in the storage section 60 (S105).

Table 1 is a table illustrating an example of the first indicatorassigned to the SI base units (m, Kg, s, A, K, Cd, and mol).

TABLE 1 SI First Base unit unit indicator Length m  3 Mass Kg  7 Time s11 Electric current A 13 Temperature K 17 Luminous intensity Cd 19Amount of substance mol 23

Further, the dimensionless quantities such as radian, steradian, and thelike are set to 1 (dimension=1) in the SI units, which is different fromintegers corresponding to the physical quantities. Therefore, eachdimensionless quantity can be assigned with a unique first indicator soas to be treated as a base unit.

As listed in Table 2, regarding the dimensionless quantities (rad, sr,etc.) as the base units, the assignment section 10 can assign the uniquefirst indicators to the dimensionless quantities.

TABLE 2 Dimensionless SI First quantity unit indicator Radian rad 29Steradian sr 31

(Derived Unit)

A derived unit in the SI units can be expressed by combining the baseunits, that is, by performing multiplication or division between thebase units (for example, Newton N=kg·m/s²). As listed in Table 3, therelation between the derived units and the base units can be stored inadvance in the storage section 60 as a second list.

TABLE 3 Expression Name SI in terms of Derived unit of unit unit SI baseunit Frequency Hertz Hz s⁻¹ Force Newton N m · kg · s⁻² Pressure/StressPascal Pa m⁻¹ · kg · s⁻² Energy/Work Joule J m² · kg · s⁻² Power Watt Wm² · kg · s⁻³ Electric Coulomb C s · A charge/Quantity of electricityVoltage/ Volt V m² · kg · s⁻³ · A⁻¹ Electrical potential differenceElectric Farad F m⁻² · kg⁻¹ · s⁴ · A² capacitance Electric Ohm Ω m² · kg· s⁻³ · A⁻² resistance Conductance Siemens S m⁻² · kg⁻¹ · s³ · A²Magnetic flux Weber Wb m² · kg · s⁻² · A⁻¹ Magnetic flux Tesla T kg ·s⁻² · A⁻¹ density Inductance Henry H m² · kg · s⁻² · A⁻² Luminance Lux1x m⁻² · cd Radioactivity Becquerel Bq s⁻¹ Absorbed dose Gray Gy m² ·s⁻² Equivalent dose Sievert Sv m² · s⁻² Catalytic activity Katal kat s⁻¹· mol

FIG. 3 is a flowchart illustrating a process of assigning the secondindicator to the derived unit.

The assignment section 10 reads out the prime numbers assigned to thebase units as the first indicators from the database 50. The assignmentsection 10 extracts a derived unit in order of the second list withreference to the second list stored in the storage section 60 (S201).Then, for each of the numerator and the denominator, the assignmentsection 10 multiplies the prime numbers, which are the first indicatorsrepresenting the base units that constitute the numerator or thedenominator, in accordance with the expression in which the base unitsof the derived unit are used (S202). For example, in regard to theexpression of Newton (N) in which base units are used, the numerator isexpressed as Kg·m. Therefore, based on the first indicators of the baseunits listed in Table 1, ‘7×3=21’ is obtained. Similarly, since thedenominator is s², ‘11×11=121’ is similarly obtained based on Table 1.

The assignment section 10 assigns a sequence, which is an integer set ofthe numerator and the denominator, to the derived unit as the secondindicator (S203), and stores the sequence in the database 50. Accordingto the example of Newton (N) described above, the second indicator forNewton (N) is given (21, 121).

The assignment section 10 assigns a unique second indicator to each ofthe derived units listed in the second list which is stored in thestorage section 60 (S204).

Table 4 is a table showing an example in which the second indicators areassigned to the derived units in the SI units. Further, in a case whereany one of the numerator and the denominator is dimensionless like thederived units such as Frequency (Hz) and Coulomb (C) listed in Table 4,the dimensionless unit is set to 1, and then a set of “1” and an integeris assigned as the second indicator. In other words, in the example ofTable 4, (1, 11) is assigned for Frequency (Hz) and (143, 1) is assignedfor Coulomb (C).

In addition, for example, in a case where a plurality of the derivedunits are in the same dimension like the derived units such as Frequency(Hz), Radioactivity (Bq), and the like, the numerator or the denominatoris multiplied by a unique prime number for identifying the unit so thatdifferent second indicators are assigned to respective derived units. Inthe example of Frequency (Hz) and Radioactivity (Bq) listed in Table 4,since both derived units are expressed with s⁻¹, (1, 11) is assigned toFrequency (Hz) as the second indicator. For distinguishing Radioactivity(Bq) from Frequency (Hz), the prime number 37 is multiplied by thenumerator, thereby assigning (37, 11) as the second indicator.

Similarly, for example, the absorbed dose shown with Gray (Gr) and theequivalent dose shown with Sievert (Sv) are in the same dimension of[m²·s⁻²] Further, the equivalent dose is a value calculated bymultiplying the absorbed dose by an effective count (W_(R)) regarding ahuman body which is different depending on the type of radiation.Therefore, by assigning one prime number of 41 to the effective count(W_(R)), in a case where the absorbed dose is expressed as (9, 121), theequivalent dose can be expressed as (9×41, 121)=(369, 121). With thesecond indicator determined as above, the absorbed dose and theequivalent dose can be distinguished from each other.

TABLE 4 Expression in terms Named SI of SI Second Derived unit unit unitbase unit indicator Frequency Hertz Hz s⁻¹ (1, 11) Force Newton N m · kg· s⁻² (21, 121) Pressure/Stress Pascal Pa m⁻¹ · kg · s⁻² (7, 363)Energy/Work Joule J m² · kg · s⁻² (63, 121) Power Watt W m² · kg · s⁻³(63, 1331) Electric Coulomb C s · A (143, 1) charge/Quantity ofelectricity Voltage/ Volt V m² · kg · s⁻³ · A⁻¹ (63, Electrical 17303)potential difference Electric Farad F m⁻² · kg⁻¹ · s⁴ · A² (2474329,capacitance 63) Electric Ohm Ω m² · kg · s⁻³ · A⁻² (63, resistance224939) Conductance Siemens S m⁻² · kg⁻¹ · s³ · A² (224939, 63) Magneticflux Weber Wb m² · kg · s⁻² · A⁻¹ (63, 1573) Magnetic flux Tesla T kg ·s⁻² · A⁻¹ (7, 1573) density Inductance Henry H m² · kg · s⁻² · A⁻² (63,20449) Luminance Lux 1x m⁻² · cd (19, 121) Radioactivity Becquerel Bqs⁻¹ (37, 11) Absorbed dose Gray Gy m² · s⁻² (9, 121) Equivalent doseSievert Sv m² · s⁻² (369, 121) Catalytic activity Katal kat s⁻¹ · mol(23, 11)

Herein below, the functions of the conversion section 20 and thearithmetic section 30 will be described in detail.

After the assignment section 10 stores the first and second indicatorsin the database 50 for all of the base units listed in the first listand the derived units listed in the second list, the arithmetic device1000 performs a calculation between the different physical quantitiesusing the first and second indicators stored in the database 50.

For example, when a user has inputted a physical quantity in the form ofa string of a quantity and a string of a unit using the input device 70at the time of designing, the conversion section 20 converts the stringof a unit, input by the user, into a corresponding second indicator withreference to the database 50. Then, a set of the quantity and the secondindicator is stored as a sequence in the storage section 60.

For example, when a user inputs a string of “50 N” using the inputdevice 70, the conversion section 20 converts the string of Newton (N)into (21, 121) that is the second indicator with reference to thedatabase 50.

Then, as a sequence which is a combination of the quantity “50” and thesecond indicator “(21, 121)”, the sequence “(50, 21, 121)” is stored inthe storage section 60. Further, in a case of the base unit, thedenominator of the second indicator is set to an integer of 1.

Further, the user can input a prefix (k, M, G, etc.) in addition to theunit using the input device 70. In general, the prefix can be expressedin the form of Z^(n), where Z represents a base and n represents anexponential part. Further, as the base Z, “10” is used for typicalphysical quantities, or 1024 (=2¹⁰) is used for volume of informationsuch as a bit or a byte. The relation between the prefix and Z^(n) canbe stored in the database 50 in advance as a third list.

When the user inputs a prefix in the form of a string using the inputdevice 70, the conversion section 20 converts the string into theexponential part of Z^(n), that is, into n that represents the prefix,by referring to the third list. Then, the conversion section 20 stores aset of the quantity, the second indicator, and the exponential part inthe storage section 60 as a sequence.

For example, when the user inputs “50 kN” (50, N, and k represent aquantity, a unit, and a prefix, respectively) using the input device 70,the conversion section 20 converts Newton (N) into (21, 121) that is asecond indicator with reference to the database 50. In addition, theconversion section 20 converts k into 3 which is the exponential part of10³. Then, the conversion section 20 stores the sequence (50, 21, 121,3) which is a set of the quantity of 50, the second indicator, and theexponential part, in the storage section 60.

In addition, the user may input an arithmetic expression includingdifferent physical quantities using the input device 70. In this case,the conversion section 20 converts each of the physical quantities intoa sequence. However, for convenience of calculation to be describedlater, the conversion section 20 converts the physical quantity rightafter the division symbol “÷” or “/” into a sequence including areciprocal number of the quantity, a second indicator in which thedenominator and the numerator are exchanged in their positions, and anegative value of the exponential part.

When the user inputs an arithmetic expression of a plurality ofdifferent physical quantities in the form of a string, the arithmeticsection 30 performs a calculation between the different physicalquantities using the sequence (hereinafter, referred to as the sequence(a, b, c, d)) of the quantity, the second indicator, and the exponentialpart, which are converted by the conversion section 20 and stored in thestorage section 60.

In the calculation performed between the plurality of different physicalquantities, there is a feature as below depending on whether or not theunits are equal to each other (a case of the arithmetic expressionrepresented in the form of multiplication). Further, in this case, asuffix (1, 2, . . . , n) is added in correspondence with the differentphysical quantity.

(i) In the case of different unit

$\begin{matrix}{( {\alpha_{1} \times \alpha_{2} \times \ldots \times \alpha_{n}} ) \times ( \frac{b_{1} \times b_{2} \times \ldots \times b_{n}}{c_{1} \times c_{2} \times \ldots \times c_{n}} ) \times B^{d_{1} + d_{2} + \ldots + d_{n}}} & ( {{Equation}\mspace{14mu} 1} )\end{matrix}$(ii) In the case of the same unit (b=b₁=b₂= . . . =b_(n), c=c₁=c₂= . . .=c_(n), d=d₁=d₂= . . . d_(n))

$\begin{matrix}{( {\alpha_{1}^{\prime} + \alpha_{2}^{\prime} + \ldots + \alpha_{n}^{\prime}} ) \times \frac{b}{c} \times B^{d}} & ( {{Equation}\mspace{14mu} 2} )\end{matrix}$

FIG. 4 is a flowchart illustrating a process of calculation performed bythe arithmetic section 30.

Specifically, the arithmetic section 30 obtains the sequence (a, b, c,d) for a plurality of physical quantities which have been converted bythe conversion section 20 and stored in the storage section 60 (S301).At this time, the arithmetic section 30 sets d to 0 for the physicalquantity to which the prefix has not been input so as to obtain asequence (a, b, c, 0).

The arithmetic section 30 refers to all of the sequences obtained fromthe storage section 60 (S302). In a case where any one of b and c in thesecond indicator in each of the sequences is different from each other(that is, the case where the units are different from each other), thearithmetic section 30 performs a multiplication (πa=A) with thequantities based on Equation 1 (S303). In addition, the arithmeticsection 30 performs a multiplication (πb=B′) with the numerators in thesecond indicators, a multiplication (πc=C′) with the denominators in thesecond indicators (S304 and S305). Then, the arithmetic section 30performs a division (reduction) with B′ and C′ and a common factor,thereby calculating B and C (S306). In addition, the arithmetic section30 performs an addition (Σd=D) with the exponential parts (S307).

The arithmetic section 30 obtains a sequence (A, B, C, D) representingthe physical quantity resulting from the calculations described above(S308), and stores the sequence in the storage section 60.

(Specific Example of Calculation)

Herein below, a specific calculation will be described based on anexample of calculating Pressure (Pa).

A unit of Pressure (Pa) can be obtained by dividing Newton (N) by Area(m²). For example, when a person weighing 50 kg gets on a stage of 50cm² under the acceleration of gravity of 1 G (9.8 m/s²), pressureapplying on the stage can be calculated by 50 kg×9.8 m/s²÷50 cm².

Herein, when the user inputs a string of “50 kg×9.8 m/s²÷50 cm²” usingthe input device 70 to calculate pressure, the conversion section 20converts “50 kg” into a sequence of (50, 7, 1, 0), “9.8 cm²” into asequence of (9.8, 3, 11², 0), and “50 cm²” into a sequence of (50⁻¹, 1,3², −(−2)×2), and stores the sequences in the storage section 60.

The arithmetic section 30 performs a multiplication “50×9.8×(50⁻¹)” ofthe quantities, multiplications “7×3×1” and “1×11²×3²” of the secondindicators, and an addition “0+0+(2×2)” of the exponential parts withreference to each of the sequences from the storage section 60 accordingto the flowchart illustrated in FIG. 4. Further, the arithmetic section30 performs a reduction on the units, thereby obtaining the sequence(9.8, 7, 363, 4) representing the calculated physical quantities. Then,the arithmetic section 30 stores the obtained sequence in the storagesection 60.

Further, in a case where the arithmetic expression includes the additionand subtraction operations, the arithmetic section 30 can performcalculations according to Equation 2. In this case, for example, it isdetermined that the units are equal to each other, so that thearithmetic section 30 performs a calculation when the units are thesame. In a case where it is determined that the units are not the same,an error message is displayed by the output device 80 which will bedescribed later, through which the user can visually recognize theresult.

In addition, in a case where the arithmetic expression includes acombination of four arithmetic operations, the arithmetic section 30 mayperform calculations according to Equations 1 and 2.

The conversion section 20 converts the unit into a string of the derivedunit or the base unit where the second indicator is matched with theportion (B, C) representing the unit of the sequence (A, B, C, D) whichis stored in the storage section 60 by the arithmetic section 30, withreference to the second indicator of the derived unit stored in thedatabase 50.

In addition, the conversion section 20 converts the exponential partinto the prefix with reference to the third list stored in the database50. At this time, if necessary, a multiplier factor in a floating pointexpression is adjusted, and the adjusted multiplier factor is added tothe exponential part, and then the resultant exponential part isconverted into the string of the prefix.

The output device 80 displays the conversion result of the conversionsection 20 in a form of a string enumerated in order of the quantity,the prefix, and the unit. Then, the output device 80 outputs thecalculation result so that the user can visually recognize thecalculation result.

With the arithmetic device 1000 according to this embodiment, by usingthe first and the second indicators assigned to the unit, even whencalculation is performed between the different units, an error in theresult caused by performing an unexpected reduction in the calculationbetween the prime numbers can be prevented. In addition, the unit can beidentified regardless of an expression style (order etc.) of the derivedunit.

In addition, the physical quantity is expressed in a simple sequence setof integers such as “the quantity, the unit, the exponential part of theprefix”. Further, calculation is divided into three parts in which thesame kind of integers are calculated just like quantity from quantity,unit from unit, and exponential part from exponential part. Therefore,calculation between different physical quantities including the unit andthe prefix can be performed simply.

Further, according to this embodiment, the description has been made inconnection with an example in which a user input a string such as anarithmetic expression using the input device 70 at the time ofdesigning. In a case where a control target apparatus connected to thearithmetic device 1000 is necessary to be controlled or a physicalquantity is required for diagnosing the apparatus, an arithmeticexpression can be automatically obtained. In addition, instead of thearithmetic expression, a physical quantity such as a maximum allowablevoltage may be assigned as an indicator to a device such as a cableconnected to the arithmetic device 1000 (direct notation, or notation byputting an information tag on an electronic medium such as an RFID andan optical medium such as a bar code). Therefore, the arithmetic device1000 can be used as a management system so that the operation of thedevices is managed in a normal state.

In addition, according to this embodiment, the description has been madein connection with an example of only the SI units. However, theinvention is not limited the example, but can be applied to the imperialunits or the like other than the SI units.

In this case, for example, a physical indicator representing “quantity”,the kind (concept) of physical quantity such as the unit notation, thelength, the weight, or the like, which expresses the units (the SIunits, the imperial units, etc.), is added in the sequence. For example,Meter (m) in the SI units and Yard (yd) in the imperial units belong tothe same “quantity” as length.

Then, a conversion expression for converting the unit is stored as alist in the database 50. Therefore, in a case where the unit indicatorsare different but the physical indicators are equal, the arithmeticsection 30 can convert the physical quantities between the differentunits with reference to the conversion expression.

(Modification)

In the first embodiment, in order to express the prefix, the exponentialpart of the prefix is assigned as an integer in the sequence in additionto the unit. In this modification, the unit and the prefix will beexpressed at the same time.

The assignment section 10 assigns prime numbers other than 2 and 5 amongthe prime numbers as the first indicators in the base unit. In addition,the assignment section 10 assigns the first indicators of the base unitto the derived unit. Further, the assignment performed in thismodification is the same as that in the first embodiment except theabove point, so that the detailed description will be not repeatedherein.

Similarly to the first embodiment, when a user inputs a string of thequantity of the physical quantity, the prefix, and the unit using theinput device 70, the conversion section 20 converts the string of theunit input by the user into the second indicator with reference to thedatabase 50.

In addition, the conversion section 20 converts the string into Z^(n)representing the prefix with reference to the third list. In a casewhere n is positive, Z^(n) is multiplied by an integer representing thenumerator in the second indicator of the unit. In a case where n isnegative, Z^(−n) is multiplied by an integer representing thedenominator. Then, the resultant value is stored in the storage section60 as a sequence of the quantity and a third indicator of the unit onwhich the prefix are reflected.

For example, when the user inputs “50 kN” (50 as the quantity, N as theunit, and k as the prefix) using the input device 70, the conversionsection 20 converts Newton (N) into (21, 121) as the second indicatorwith reference to the database 50. In addition, the conversion section20 converts k into 10³=1000 with reference to the storage section 60,and multiplies 21 representing the numerator of the second indicators by1000 to obtain 21000. Then, the conversion section 20 stores, in thestorage section 60, the sequence set (50, 21000, 121) of the quantity of50 and the third indicator on which the prefix is reflected.

When the user inputs a plurality of different physical quantities in aform of a string, the arithmetic section 30 performs calculation betweenthe different physical quantities using the sequence (hereinafter,denoted by the sequence (a, e, f)) of the quantity and the thirdindicator on which the prefix is reflected, which are converted by theconversion section 20 and stored in the storage section 60.

In a case where the arithmetic section 30 determines that the units aredifferent from each other with reference to all of the sequencesobtained from the storage section 60, the arithmetic section 30 performsmultiplication between the quantities (πa=A). In addition, thearithmetic section 30 performs multiplication between the numerators inthe third indicator (πe=E′), between the denominators in the thirdindicator (πf=F′), and performs division (reduction) on each multipliedresult by a common factor of E′ and F′, so that E and F are calculated.

Then, the arithmetic section 30 stores, in the storage section 60, asequence (A, E, F) representing the physical quantities resulting fromthe calculations described above.

Therefore, the physical quantities becomes a set of integers including“the quantity, the unit including the prefix”, so that the expression ofthe sequence can be simplified further more. By separating thecalculation of the quantities from that of the units including theprefix, the different physical quantities can be simply calculatedfurther more.

Furthermore, since 2 and 5 are excluded from the first indicator of thebase unit, when the units including the prefix are calculated, anunexpected reduction is not performed. Therefore, the calculation can beperformed without an error.

In addition, the description has been made focusing on an example wherea decimal system is employed, in which the base Z is set to 10 (in acase of the amount of information, 1024) as the exponential partrepresenting the prefix. However, a single prime number or the productof plural prime numbers may be used as the base Z, for example.

In this case, the assignment section 10 assigns, to the base unit, aprime number as the first indicator excepting the prime number obtainedby factorizing the base Z into prime factors.

As an example, in a case where the base Z is set to 21 as the primenumber representing the prefix, the assignment section 10 factorizes 21into 3 and 7, so that the prime numbers excepting 3 and 7 may beassigned to the base unit as the first indicator. In addition, in a casewhere the base Z is set to 7 as a single prime number, the assignmentsection 10 may assign the prime numbers excepting 7 to the base unit asthe first indicator.

Therefore, similarly to the case where 2 and 5 as the prime factors of10 are excluded when the base Z is expressed using the decimal system asdescribed above, an unexpected reduction is not performed when the unitsincluding the prefix are calculated. Therefore, the calculation can beperformed without an error.

The conversion section 20 separates the prefix Z^(n) from the integer ofthe third indicator, for example, using the prime factorization or thelike. Then, the conversion section 20 converts the exponential part intothe string of the prefix with reference to the third list stored in thedatabase 50. In addition, referring to the second indicator of thederived unit stored in the database 50, the conversion section 20converts the unit into a string of the derived unit or the base unitwhere the third indicator from which the prefix has been separated ismatched with the second indicator.

Second Embodiment

FIG. 5 is a diagram illustrating a configuration of an arithmetic device2000 according to a second embodiment.

The arithmetic device 2000 is different from the arithmetic device 1000according to the first embodiment in that a checking section 40 isprovided. Further, the same components as those of the arithmetic device1000 will be denoted with the same reference numerals, and thedescription thereof will not be repeated.

The checking section 40 determines whether or not, when the arithmeticsection 30 performs calculation between different physical quantities,the calculation result is a significant physical quantity. The checkingsection 40 is embodied using the arithmetic processing device 100 suchas a CPU.

Herein below, the functions of the checking section 40 will be describedin detail.

The unit obtained from the calculation result can be used fordetermining whether or not the physical quantity is significant.

For example, in a case where the unit obtained as a result of themultiplication or the division performed between the physical quantitiesis not found in a combination of the base units, it can be recognizedthat the calculation result is an insignificant physical quantity. Onthe contrary, in a case where the unit is found in a combination thebase units, it can be recognized that the calculation result is asignificant physical quantity.

The checking section 40 obtains the sequence (A, B, C, D) as thecalculation result which is stored in the storage section 60 by thearithmetic section 30, and extracts the unit portion (B, C) therefrom.Then, the checking section 40 checks the extracted unit (B, C) againstthe first or second indicator with reference to the first indicator ofthe base unit and the second indicator of the derived unit stored in thedatabase 50.

As a result, in a case where there is a unit which is matched with theunit (B, C), that is, both conditions B=b and C=c are satisfied in thefirst or second indicator stored in the database 50, the checkingsection 40 determines that the calculation result is a significantphysical quantity.

On the other hand, in a case where there is no unit which is matchedwith the extracted unit (B, C) in the first or second indicator storedin the database 50, the checking section 40 determines that thecalculation result is an insignificant physical quantity. In this case,for example, an error message may be displayed by the output device 80,so that a user can be visually recognized.

With the arithmetic device 2000 according to this embodiment, only thecalculation which obtains a significant physical quantity can beperformed. Therefore, a human error caused by a user can be prevented ina user's designing process and the like.

With the arithmetic device according to at least one of the embodimentsdescribed above, calculation can be performed between different physicalquantities including a unit and a prefix without an error.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel methods and systems describedherein may be embodied in a variety of the other forms; furthermore,various omissions, substitutions and changes in the form the methods andsystems described herein may be made without departing from the sprit ofthe inventions. The accompanying claims and their equivalents areintended to cover such forms or modifications as would fall within thescope and spirit of the inventions.

What is claimed is:
 1. An arithmetic device comprising: a databaseimplemented by a memory, that stores a first indicator representing abase unit included in a unit system being assigned with a prime numberother than a prime factor of a prefix which is expressed with a baseincluding the prime factor and an exponential part, and a secondindicator representing a derived unit expressed, by combining the baseunits, in a form of a simple fraction including a numerator and adenominator, each of which is assigned with an integer obtained by theproduct of the first indicators; a conversion section implemented by aprocessor, that obtains a plurality of physical quantities eachincluding a quantity, a prefix, and a unit, when the unit belongs to arespective base unit, the conversion section obtaining a third indicatorby converting the unit into the first indicator and multiplying theconverted first indicator by the prefix, or when the unit belongs to thederived unit, the conversion section obtaining the third indicator byconverting the unit into the second indicator and multiplying theconverted second indicator by the prefix; and an arithmetic sectionimplemented by a processor, that performs calculation between thequantities of the plurality of physical quantities and between the thirdindicators.
 2. The arithmetic device according to claim 1, wherein thedatabase stores the first indicator which is a prime number other than 2and 5 and assigned to the base unit.
 3. An arithmetic device comprising:a database implemented by a memory, that stores a first indicatorrepresenting a base unit included in a unit system being assigned with aprime number and a second indicator representing a derived unitexpressed by combining the base units in a form of a simple fractionincluding a numerator and a denominator each of which is assigned withan integer obtained by the product of the first indicators; a conversionsection implemented by a processor, that obtains a plurality of physicalquantities each including a quantity, a prefix expressed with a base andan exponential part, and a unit, when the unit belongs to a respectivebase unit, the conversion section converting the unit into the firstindicator, or when the unit belongs to the derived unit, the conversionsection converting the unit into the second indicator; and an arithmeticsection implemented by a processor, that performs a first calculationbetween the quantities of the plurality of physical quantities, a secondcalculation between the converted first indicators or between theconverted second indicators, and a third calculation between theexponential parts.
 4. The arithmetic device according to claim 3,further comprising: a checking section implemented by a processor, thatchecks a result of the third calculation against the first or secondindicator stored in the database; and an output section that outputs theresult, wherein when the result is not matched with any of the first andsecond indicator, the output section outputs an error message.